/**
 * Copyright © 2021-2025 <a href="http://www.jeeplus.org/">JeePlus</a> All rights reserved.
 */
package com.jeeplus.invoice.customer.service.mapstruct;


import com.jeeplus.core.mapstruct.EntityWrapper;
import com.jeeplus.invoice.customer.service.dto.YxfpCustomerDTO;
import com.jeeplus.invoice.customer.domain.YxfpCustomer;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.Mappings;
import org.mapstruct.ReportingPolicy;
import org.mapstruct.factory.Mappers;

/**
 *  YxfpCustomerWrapper
 * @author 张如利
 * @version 2022-01-20
 */
@Mapper(componentModel = "spring", unmappedTargetPolicy = ReportingPolicy.IGNORE, uses = {} )
public interface YxfpCustomerWrapper extends EntityWrapper<YxfpCustomerDTO, YxfpCustomer> {

    YxfpCustomerWrapper INSTANCE = Mappers.getMapper(YxfpCustomerWrapper.class);
     @Mappings({
            @Mapping(source = "createBy.id", target = "createBy"),
            @Mapping (source = "updateBy.id", target = "updateBy")})
    YxfpCustomer toEntity(YxfpCustomerDTO dto);


    @Mappings({
            @Mapping (source = "createBy", target = "createBy.id"),
            @Mapping (source = "updateBy", target = "updateBy.id")})
    YxfpCustomerDTO toDTO(YxfpCustomer entity);
}

